<template>
    <div class="admintop" id="admintop">
        <div class="el-col el-col-3">
            <img class="admintop-logo" src="../../assets/img/boyellLogo2.png" />
        </div>
        <div class="admin">
            <span>admin</span>
            <i class="Sign" @click="open"></i>
        </div>
    </div>
</template>
<script>
	
	export default {
        data(){
            return {
            }
        },
	    methods:{
	        open:function(){

                this.$confirm('该操作将清除缓存并退出登录, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    this.$layer.closeAll()
                    this.$router.push({path:'/login/login'})
                    sessionStorage.removeItem("userInfo");
                    this.$message({
                        type: 'success',
                        message: '退出成功'
                    });   
                })
                .catch(() => {
                    this.$message({
                        type: 'info',
                        message: '操作失败'
                    });          
                });



                
            }
	    }
	}
</script>
